﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<% using (Ajax.BeginForm("Update", "ChuHang", new AjaxOptions { UpdateTargetId = "list_ChuHang" }, new { name = "FormChuHang" }))
   {
       %>
        <%: Html.TextBox("khachhang_edit", (string)ViewData["khachhang_sendedit"], new { style = "display:none;" })%>
            <%: Html.TextBox("pagesize_edit", (string)ViewData["pagesize_sendedit"], new { style = "display:none;" })%>
            <%: Html.TextBox("page_edit", (string)ViewData["page_sendedit"], new { style = "display:none;" })%>
            <%
                Data.DBOES.Membership obj = (Data.DBOES.Membership)ViewData["DataChuHang"];
       if (obj != null)
       {
       %>
           
        <table width="100%">
        <tr>
            <td style="padding-left:10px">Mã CH:</td>
            <td><span class="AddNew"><input type="text"  name="IdChuHang" value="<%= obj.IdMembership %>" readonly="readonly"/></span></td>
            <td>Tên chủ hàng:</td>
            <td><span class="AddNew"><input type="text"  name="TenChuhang" value="<%= obj.MembershipName %>"/></span></td>
            <td>Địa chỉ:</td>
            <td><span class="AddNew"><input type="text"  name="DiaChi" value="<%= obj.Address %>"/></span></td>
        </tr>
        <tr>
            <td style="padding-left:10px">Điện thoại:</td>
            <td><span class="AddNew"><input type="text"  name="DienThoai" id="DienThoai" value="<%= obj.Phone %>"/></span></td>
            <td>Email:</td>
            <td><span class="AddNew"><input type="text"  name="Email" id="Email" value="<%= obj.Email %>"/></span></td>
            <td></td>
            <td></td>
        </tr>
        
        <tr>
            <td colspan="6"><div class="Submit">
        	<ul>
            	<li class="Cancel"><a href="javascript:SubmitButton('cancle')">Hủy</a><input type="reset" style="display:none" name="btnCancel"/></li>
                <li class="Adds"><a href="javascript:SubmitButton('add')">Thêm</a><input type="submit" style="display:none" name="btnAdd" /></li>
            </ul>
        </div></td>
        </tr>
        </table>        
         
        <%
       }
       else
       { 
        %>
        <table width="100%">
        <tr>
            <td style="padding-left:10px">Mã CH:</td>
            <td><span class="AddNew"><input type="text"  name="IdChuHang"  readonly="readonly"/></span></td>
            <td>Tên chủ hàng:</td>
            <td><span class="AddNew"><input type="text"  name="TenChuhang" id="TenChuhang" /></span></td>
            <td>Địa chỉ:</td>
            <td><span class="AddNew"><input type="text"  name="DiaChi" /></span></td>
        </tr>
        <tr>
            <td style="padding-left:10px">Điện thoại:</td>
            <td><span class="AddNew"><input type="text"  name="DienThoai" id="DienThoai" /></span></td>
            <td>Email:</td>
            <td><span class="AddNew"><input type="text"  name="Email"  id="Email"/></span></td>
            <td></td>
            <td></td>
        </tr>
        <tr>
            <td colspan="6"><div class="Submit">
        	<ul>
            	<li class="Cancel"><a href="javascript:SubmitButton('cancle')">Hủy</a><input type="reset" style="display:none" name="btnCancel"/></li>
                <li class="Adds"><a href="javascript:SubmitButton('add')">Thêm</a><input type="submit" style="display:none" name="btnAdd" /></li>
            </ul>
        </div></td>
        </tr>
        </table>        
         
        <%
       }
        
   }
    %>